(function(jwplayer){
  breaking_news_plugin = function(player, config, div) {
    function _setup(evt) {
        if(player.getRenderingMode() == 'flash') {
            img.innerHTML = config.html;
            return;
            }
        var maxwidth = getMaxWidth();
        var width2 = parseInt(maxwidth.replace("px",""));
        width2 = parseInt(width2/3);
        $(div).append("<img/>");
        var img = $(div).find("img");
        $(img).css("display","none");
        $(img).css('width',width2+"px");
        $(img).attr("src","/wordpress/wp-content/plugins/video-wizard/libs/Smarty/templates/img/bn.png")
        $(img).css("background-color","#660000");
        $(img).css("color","white");
        $(img).css("margin-top","10px");
        
        img.innerHTML = config.html;
        $(img).fadeIn("slow",function(){$(this).delay(10000).fadeOut("slow");});
        
        
    };
    player.onReady(_setup);
    this.resize = function(width, height) {
        
    };
  };
  jwplayer().registerPlugin('breaking_news_plugin', breaking_news_plugin,"breakingnews.swf");
})(jwplayer);